package com.longge;

public class MinCostToMoveChips {

    public int minCostToMoveChips(int[] position) {

        int odd = 0, even = 0;
        for (int j : position) {
            if (j % 2 == 0) even++;
            else odd++;
        }
        return Math.min(odd, even);

    }
}
